<template>
  <div>
     <van-nav-bar title="收藏的文章" left-arrow @click-left="$router.back()" fixed />
     <van-cell-group v-for="item in userStartList" :key="item.art_id">
       <van-cell :title="item.title" :value="item.pubdate" class="test" :to="`article_detail?article_id=${item.art_id}`"/>
     </van-cell-group>
  </div>
</template>

<script>
  import {userStartArticleApi} from '../../api/index.js'
  export default {
    name:'Start',
    data(){
      return{
        userStartList:[]
      }
    },
    activated(){
      this.getuserStartArticleApi()
    },
    methods:{
      async getuserStartArticleApi(){
        let {data:res} = await userStartArticleApi()
        this.userStartList = res.data.results
        console.log(res)
      }
    }
  }
</script>

<style scoped lang="less">
  .van-cell__title{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /deep/.van-cell-group{
    padding-top: 50px;
  }
</style>
